package com.zsrt.java.day20161229.cg.demo03;

public class Student03 {
	private String name;
	public String getName() {
				return name;
	}
	public void setName(String name) {
		if(name!=null){
			if(name.length()>=2&&name.length()<=4){
				this.name = name;
			}
		}
		
	}
	private String id;
	private char sex;
	private int age;
	private String schoolName;
	public String getId() {
		return id;
	}
	public void setId(String id) {
		int len = id.length();
		if(len>=1&&len<=18){
			this.id = id;
		}
	}
	public char getSex() {
		
		return sex;
	}
	public void setSex(char sex) {
		if(sex=='男'||sex=='女'){
			this.sex = sex;
		}
	}
	public int getAge() {
		return age;
	}
	public void setAge(int age) {
		if(age>=1&&age<=130){
			this.age = age;
		}
	}

	public String getSchoolName() {
		return schoolName;
	}
	public void setSchoolName(String schoolName) {
		this.schoolName = schoolName;
	}
	@Override
	public String toString() {
		return "Student03 [name=" + name + ", id=" + id + ", sex=" + sex + ", age=" + age + ", schoolName=" + schoolName
				+ "]";
	}

	
}
